﻿@model WebFitness.Funcionario

@{
    ViewBag.Title = "Cadastrar";
}

<div class="span7">
    <div class="top-bar">
        <h3>
            <i class="icon-cog"></i>
            Cadastro Funcionários
        </h3>
    </div>
    <div class="well no-padding">
        @using (Html.BeginForm("Create", "Funcionario", FormMethod.Post, new { @class = "form-horizontal" }))
        {    
            @Html.AntiForgeryToken()
            @Html.ValidationSummary(true)

            <div class="control-group">
                @Html.LabelFor(model => model.nome, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.nome, new { @class = "span6 m-wrap" })
                    @Html.ValidationMessageFor(model => model.nome)
                </div>
            </div>

            <div class="control-group">
                @Html.LabelFor(model => model.cpf, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.cpf, new { @class = "span6 m-wrap" })
                    @Html.ValidationMessageFor(model => model.cpf)
                </div>
            </div>

            <div class="control-group">
                @Html.LabelFor(model => model.telefone, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.telefone, new { @class = "span6 m-wrap" })
                    @Html.ValidationMessageFor(model => model.telefone)
                </div>
            </div>

            <div class="control-group">
                @Html.LabelFor(model => model.email, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.email, new { @class = "m-wrap" })
                    @Html.ValidationMessageFor(model => model.email)
                </div>
            </div>
            
            <div class="control-group">
                @Html.LabelFor(model => model.rua, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.rua, new { @class = "span6 m-wrap" })
                    @Html.ValidationMessageFor(model => model.rua)
                </div>
            </div>

            <div class="control-group">
                @Html.LabelFor(model => model.bairro, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.bairro, new { @class = "span6 m-wrap" })
                    @Html.ValidationMessageFor(model => model.bairro)
                </div>
            </div>
            
            <div class="control-group">
                @Html.LabelFor(model => model.cep, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.cep, new { @class = "span6 m-wrap" })
                    @Html.ValidationMessageFor(model => model.cep)
                </div>
            </div>

            <div class="control-group">
                @Html.LabelFor(model => model.ctps, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.ctps, new { @class = "span6 m-wrap" })
                    @Html.ValidationMessageFor(model => model.ctps)
                </div>
            </div>

            <div class="control-group">
                @Html.LabelFor(model => model.sexo, new { @class = "control-label" })

                <div class="controls">
                    <label class="radio"><span>@Html.RadioButtonFor(model => model.sexo, 'M')</span> Masculino</label>
                    <label class="radio"><span>@Html.RadioButtonFor(model => model.sexo, 'F')</span> Feminino</label>
                </div>
            </div>

            <div class="control-group">
                @Html.LabelFor(model => model.aniversario, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.aniversario, new { @class = "span6 m-wrap" })
                    @Html.ValidationMessageFor(model => model.aniversario)
                </div>
            </div>
            
            <div class="control-group">
                @Html.LabelFor(model => model.idTpFuncionario, new { @class = "control-label" })

                <div class="controls">
                    <label class="radio"><span>@Html.RadioButtonFor(model => model.idTpFuncionario, (byte)WebFitness.TipoFunacionario.Administrador)</span> @WebFitness.TipoFunacionario.Administrador</label>
                    <label class="radio"><span>@Html.RadioButtonFor(model => model.idTpFuncionario, (byte)WebFitness.TipoFunacionario.Instrutor)</span> @WebFitness.TipoFunacionario.Instrutor</label>
                    <label class="radio"><span>@Html.RadioButtonFor(model => model.idTpFuncionario, (byte)WebFitness.TipoFunacionario.Recepcionista)</span> @WebFitness.TipoFunacionario.Recepcionista</label>
                </div>
            </div>
            
            <div class="control-group">
                @Html.LabelFor(model => model.idCidade, new { @class = "control-label" })

                <div class="controls">
                    @Html.DropDownList("idCidade", String.Empty)
                    @Html.ValidationMessageFor(model => model.idCidade)
                </div>
            </div>

            <div class="control-group">
                @Html.LabelFor(model => model.login, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.login, new { @class = "span6 m-wrap" })
                    @Html.ValidationMessageFor(model => model.login)
                </div>
            </div>

            <div class="control-group">
                @Html.LabelFor(model => model.senha, new { @class = "control-label" })

                <div class="controls">
                    @Html.PasswordFor(model => model.senha, new { @class = "span3 m-wrap" })
                    @Html.ValidationMessageFor(model => model.senha)
                </div>
            </div>

            <div class="form-actions">
                <input type="submit" class="btn btn-success" create="create" name="enviar" value="Salvar" />
                @Html.ActionLink("Cancelar", "Index", null, new { @class = "btn btn-danger" })
            </div>

        }

    </div>
</div>
